package com.atguigu.meiju;

public class XingQi {
    //（2）在类初始化时提前创建好这个类的固定的有限的几个对象
    //以下对象一般都是比较固定的，"建议"它们都加final
    public static final XingQi MONDAY = new XingQi("星期一");
    public static final XingQi TUESDAY = new XingQi();
    public static final XingQi WEDNESDAY = new XingQi();
    public static final XingQi THURSDAY = new XingQi();
    public static final XingQi FRIDAY = new XingQi();
    public static final XingQi SATURDAY = new XingQi();
    public static final XingQi SUNDAY = new XingQi();
    //转大小写快捷键：Ctrl + Shift + U

    //对于上面的常量对象，它们的属性一般也"建议"用final
    private final String description;

    //（1）构造器私有化
    private XingQi(){
        description = "xxx";
    }

    private XingQi(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "XingQi{" +
                "description='" + description + '\'' +
                '}';
    }
}
